<script setup lang="ts">
import UvLine from '@/uv-ui/components/nv-line/uv-line.vue'

function handleClickLeft() {
  uni.navigateBack()
}
function toAdd() {
  uni.navigateTo({ url: '/pages/addIngredients/addIngredientsAdd' })
}
</script>

<template>
  <view class="h-full flex flex-col overflow-hidden">
    <wd-navbar title="新建加料分组" left-text="返回" left-arrow @click-left="handleClickLeft" />
    <scroll-view
      class="box-border flex-1 overflow-hidden p-[10px]"
      :show-scrollbar="false"
      scroll-y
    >
      <custom-wd-input
        required
        custom-input-class="text-align-right"
        label="分组名称"
        placeholder="例如：奶茶加料"
        placeholder-class="text-align-right"
      />
      <view class="my-2">
        <uv-line />
      </view>
      <view class="mx-[20px]">
        <wd-text text="加料" bold size="14px" color="#333" />
      </view>
      <view class="mt-3 h-[140px] flex flex-col items-center justify-center rounded-lg bg-white">
        <wd-text text="还没有加料，点击下方按钮添加" size="12px" color="#333" />
        <wd-text text="例如：椰果、珍珠、加奶" size="12px" color="#333" class="mt-1" />
        <wd-button :round="false" size="small" class="mt-4" @click="toAdd">新建加料</wd-button>
      </view>
    </scroll-view>
    <view class="flex border-t-1 border-border border-t-solid bg-white p-4">
      <wd-button type="primary" :round="false" class="flex-1">确定</wd-button>
    </view>
  </view>
</template>

<style scoped lang="scss"></style>
